<?php
/**
 * This class will generate the xhtml code.
 *
 * @author Redouane Benkaddour <redouane@indago.nl>
 * @version 0.5.2
 * @package reform
 * @subpackage input_generator
 */
class input_generator extends general_components {

	/**
    * generates the xhtml code and returns the string
    *
    * @param string $type
    * @return string $code
    */
	protected function generateCode($type){
		$code = '<input type="'.$type.'" ';
		foreach($this->attribute AS $attribute => $value){
			$code.= $attribute.'="'.$value.'" ';
		}
		$code.= '/>';
		return $code;
	}
}

?>